package cn.com.surker.util;

import cn.hutool.core.collection.CollUtil;
import org.apache.poi.xssf.usermodel.XSSFCellStyle;
import org.apache.poi.xssf.usermodel.XSSFSheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;

import java.util.List;

/**
 * excel导出的POI的样式生成方法
 */
public class SaleExportUtil {


    /**
     * 根据list设置列宽度
     * @param sheet
     * @param list
     */
    public static void  setColumnWidthList(XSSFSheet sheet, List<Integer> list){
        if(CollUtil.isNotEmpty(list)){
            for (int i = 0; i < list.size(); i++){
                sheet.setColumnWidth(i, list.get(i));
            }
        }
    }

    public XSSFCellStyle GenerateStyles(XSSFWorkbook wb){
        XSSFCellStyle titleStyle = wb.createCellStyle();

        return titleStyle;
    }



}
